using QAssetBundle;
using QFramework;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;

namespace ProjectSurvivor
{
	public class TestUIGameOverPanelData : UIPanelData
	{
	}
	public partial class TestUIGameOverPanel : UIPanel
	{
		protected override void OnInit(IUIData uiData = null)
		{
			mData = uiData as TestUIGameOverPanelData ?? new TestUIGameOverPanelData();
            Time.timeScale = 0;
            // please add init code here
			BtnBackToStart.onClick.AddListener(()=>
			{
                AudioKit.PlaySound(Sfx.BUTTONCLICK);
                this.CloseSelf();
				SceneManager.LoadScene(1);
			});
			AudioKit.PlaySound(Sfx.GAMEPASS);
		}
        
        protected override void OnOpen(IUIData uiData = null)
		{
		}
		
		protected override void OnShow()
		{
		}
		
		protected override void OnHide()
		{
		}
		
		protected override void OnClose()
		{
            Time.timeScale = 1;
        }
	}
}
